﻿//************************************************************************************************
// Copyright © 2014 Steven M. Cohn. All Rights Reserved.
// 
//************************************************************************************************

namespace River.Folderize.UI
{
	using System.Windows;
	using System.Windows.Controls;


	/// <summary>
	/// Interaction logic for FolderSelectorControl.xaml
	/// </summary>
	internal partial class FolderSelectorControl : UserControl
	{
		public FolderSelectorControl ()
		{
			InitializeComponent();
		}


		public event RoutedEventHandler Checked;
		public event RoutedEventHandler Unchecked;


		public bool? IsChecked
		{
			get { return folderCheck.IsChecked; }
			set { folderCheck.IsChecked = value; }
		}


		private void OnChecked (object sender, RoutedEventArgs e)
		{
			if (Checked != null)
			{
				Checked(this, e);
			}
		}


		private void OnUnchecked (object sender, RoutedEventArgs e)
		{
			if (Unchecked != null)
			{
				Unchecked(this, e);
			}
		}
	}
}
